home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atlas of Florida
/
Atlas of Florida.iso
/
Movies
/
1.0 Introduction
/
1.0 Introduction
/
00244_Script_244
< prev
next >
Wrap
Text File
|
1994-08-23
|
9KB
|
246 lines
-- Weight (Wgt) return text popUp menu
on AlphabetMenuWgt -- a pop up menu returning item text
global PopAlphaWgt
-- dispose of any previous instances, if any
if objectP( PopAlphaWgt ) then PopAlphaWgt( mDispose )
set menuListWgt = the text of cast "WgtMenList1"
-- Be sure to set parameter itemNum for PopNum or PopText to zero.
set PopAlphaWgt = PopMenu(mNew,menuListWgt, 216)
if not objectP( PopAlphaWgt ) then
alert "PopMenu Object not made: " & string( PopAlphaWgt )
end if
-- to set automatic remembering of last item selected
PopAlphaWgt(mSmart, 1 )
-- PopMenu uses screen co÷rdinates, which must be changed
-- to window co÷rdinates with the StageLeft & stageTop functions
set sH = the left of sprite 18 + the stageLeft + 1
set sV = the top of sprite 18 + the stageTop + 1
set result = PopAlphaWgt(mPopText, sH, sV, 0)
if string( result ) = "" then exit
else set the text of cast "WgtMen1" to " " & string( result )
MakeConversionWgt
-- dispose of this menu
if objectP( PopAlphaWgt ) then PopAlphaWgt( mDispose )
on AlphabetMenu2Wgt -- a pop up menu returning item text
global PopAlpha2Wgt
-- dispose of any previous instances, if any
if objectP( PopAlpha2Wgt ) then PopAlpha2Wgt( mDispose )
set menuListWgt = the text of cast "WgtMenList2"
-- Be sure to set parameter itemNum for PopNum or PopText to zero.
set PopAlpha2Wgt = PopMenu(mNew,menuListWgt, 216)
if not objectP( PopAlpha2Wgt ) then
alert "PopMenu Object not made: " & string( PopAlpha2Wgt )
end if
-- to set automatic remembering of last item selected
PopAlpha2Wgt(mSmart, 1 )
-- PopMenu uses screen co÷rdinates, which must be changed
-- to window co÷rdinates with the StageLeft & stageTop functions
set sH = the left of sprite 21 + the stageLeft + 1
set sV = the top of sprite 21 + the stageTop + 1
set result = PopAlpha2Wgt(mPopText, sH, sV, 0)
if string( result ) = "" then exit
else set the text of cast "WgtMen2" to " " & string( result )
MakeConversionWgt
-- dispose of this menu
if objectP( PopAlpha2Wgt ) then PopAlpha2Wgt( mDispose )
on MakeConversionWgt -- does conversion based on the menus and the entered value
showChannel 20
-- hide other answers
hideChannel 8
hideChannel 14
put string(the text of cast "WgtMen1") into menu1Wgt
put string(the text of cast "WgtMen2") into menu2Wgt
put value(the text of cast "WgtValue") into cValueWgt -- entered by user
put "?" into field "AnswerWgt"
if menu1Wgt = " oz" then
if menu2Wgt = " oz" then
put cValueWgt into field "AnswerWgt"
put cValueWgt into field "AnswerString"
end if
if menu2Wgt = " lb" then
put ( cValueWgt / 16.0) into field "AnswerWgt"
put cValueWgt & " / 16" into field "AnswerString"
end if
if menu2Wgt = " ton" then
put ( cValueWgt / 16.0 / 2000.0 ) into field "AnswerWgt"
put "( " & cValueWgt & " / 16 ) / 2,000" into field "AnswerString"
end if
if menu2Wgt = " g" then
put ( cValueWgt * 28.3495 ) into field "AnswerWgt"
put cValueWgt & " * 28.3495" into field "AnswerString"
end if
if menu2Wgt = " kg" then
put ( cValueWgt * 28.3495 ) / 1000.0 into Field "AnswerWgt"
put "( " & cValueWgt & " * 28.3495 ) / 1,000" into field "AnswerString"
end if
if menu2Wgt = " m ton" then
put ( cValueWgt * 28.3495 ) / 1000.0 / 1000.0 into Field "AnswerWgt"
put "( ( " & cValueWgt & " * 28.3495 ) / 1,000 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Wgt = " lb" then
if menu2Wgt = " oz" then
put cValueWgt * 16.0 into field "AnswerWgt"
put cValueWgt & " * 16" into field "AnswerString"
end if
if menu2Wgt = " lb" then
put cValueWgt into field "AnswerWgt"
put cValueWgt into field "AnswerString"
end if
if menu2Wgt = " ton" then
put ( cValueWgt / 2000.0 ) into field "AnswerWgt"
put cValueWgt & " / 2,000" into field "AnswerString"
end if
if menu2Wgt = " g" then
put ( cValueWgt * 453.59 ) into field "AnswerWgt"
put cValueWgt & " * 453.59" into field "AnswerString"
end if
if menu2Wgt = " kg" then
put ( cValueWgt * 453.59 ) / 1000.0 into Field "AnswerWgt"
put "( " & cValueWgt & " * 453.59 ) / 1,000" into field "AnswerString"
end if
if menu2Wgt = " m ton" then
put ( cValueWgt * 453.59 ) / 1000.0 / 1000.0 into Field "AnswerWgt"
put ( ( " & cValueWgt & " * 453.59 ) / 1,000 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Wgt = " ton" then
if menu2Wgt = " oz" then
put cValueWgt * 2000.0 * 16.0 into field "AnswerWgt"
put "( " & cValueWgt & " * 2,000 ) * 16" into field "AnswerString"
end if
if menu2Wgt = " lb" then
put cValueWgt * 2000.0 into field "AnswerWgt"
put cValueWgt & " * 2,000" into field "AnswerString"
end if
if menu2Wgt = " ton" then
put ( cValueWgt ) into field "AnswerWgt"
put cValueWgt into field "AnswerString"
end if
if menu2Wgt = " g" then
put ( cValueWgt * 907.18 ) * 1000.0 into field "AnswerWgt"
put "( " & cValueWgt & " * 907.18 ) * 1,000" into field "AnswerString"
end if
if menu2Wgt = " kg" then
put ( cValueWgt * 907.18 ) into Field "AnswerWgt"
put cValueWgt & " * 907.18" into field "AnswerString"
end if
if menu2Wgt = " m ton" then
put ( cValueWgt * 907.18 ) / 1000.0 into Field "AnswerWgt"
put "( " & cValueWgt & " * 907.18 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Wgt = " g" then
if menu2Wgt = " oz" then
put (cValueWgt * 0.035274) into field "AnswerWgt"
put cValueWgt & " * .035274" into field "AnswerString"
end if
if menu2Wgt = " lb" then
put (cValueWgt * 0.035274) / 16.0 into field "AnswerWgt"
put "( " & cValueWgt & " * .035274 ) / 16" into field "AnswerString"
end if
if menu2Wgt = " ton" then
put (cValueWgt * 0.035274) / 16.0 / 2000.0 into field "AnswerWgt"
put "( ( " & cValueWgt & " * .035274 ) / 16 ) / 2,000" into field "AnswerString"
end if
if menu2Wgt = " g" then
put cValueWgt into field "AnswerWgt"
put cValueWgt into field "AnswerString"
end if
if menu2Wgt = " kg" then
put ( cValueWgt / 1000.0 ) into Field "AnswerWgt"
put cValueWgt & "/ 1,000" into field "AnswerString"
end if
if menu2Wgt = " m ton" then
put ( cValueWgt / 1000.0 ) / 1000.0 into Field "AnswerWgt"
put "( " & cValueWgt & " / 1,000 ) / 1,000" into field "AnswerString"
end if
end if
if menu1Wgt = " kg" then
if menu2Wgt = " oz" then
put (cValueWgt * 2.2046) * 16.0 into field "AnswerWgt"
put "( " & cValueWgt & " * 2.2046 ) * 16" into field "AnswerString"
end if
if menu2Wgt = " lb" then
put (cValueWgt * 2.2046) into field "AnswerWgt"
put cValueWgt & " * 2.2046" into field "AnswerString"
end if
if menu2Wgt = " ton" then
put (cValueWgt * 2.2046) / 2000.0 into field "AnswerWgt"
put "( " & cValueWgt & " * 2.2046 ) / 2,000" into field "AnswerString"
end if
if menu2Wgt = " g" then
put cValueWgt * 1000.0 into field "AnswerWgt"
put cValueWgt & " * 1,000" into field "AnswerString"
end if
if menu2Wgt = " kg" then
put ( cValueWgt) into Field "AnswerWgt"
put cValueWgt into field "AnswerString"
end if
if menu2Wgt = " m ton" then
put ( cValueWgt / 1000.0 ) into Field "AnswerWgt"
put cValueWgt & " / 1,000" into field "AnswerString"
end if
end if
if menu1Wgt = " m ton" then
if menu2Wgt = " oz" then
put (cValueWgt * 2204.6) * 16.0 into field "AnswerWgt"